<?php

 
class filtro {
    public function filtro_alphanumerico($val){
      
           return filter_var($val, FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => "/^[a-zA-Z0-9 _]+$/")));

        
        
    }
    public  function filtro_numero(){
         return filter_var($val, FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => "/^[0-9]+$/")));
    }
    
}//Fin del la clase filtro.

?>
